<!DOCTYPE HTML>
<html>

<head><meta name="generator" content="Hexo 3.9.0">
  <meta charset="utf-8">
  
  <title>基于 .NET CORE 3.1 提供的 worker service 来创建 windows 服务 | DeepThought</title>
  <meta name="google-site-verification" content="Ei6mmDdf-cJwox1RvJOeX8Dc720fqWjZQu-Ww2BjBt4">
  
  <meta name="author" content="积慕">
  
  <meta name="description" content=".NET 服务,windows service, windows 服务,worker service,worker,  netcore windows service, C# service, 制作windows服务,系统服务,net core,netcore服务">
  
  
  <meta name="keywords" content=".NET 服务,windows service, windows 服务,worker service,worker, netcore windows service, C# service, 制作windows服务,系统服务,net core,netcore服务">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

  
  <meta property="og:title" content="基于 .NET CORE 3.1 提供的 worker service 来创建 windows 服务">
  <meta property="og:site_name" content="DeepThought">

  
  <meta property="og:image" content>
  

  <link href="https://pic.zhuliang.ltd/favicon.ico" rel="shortcut icon" type="image/x-icon">
  <link rel="alternate" href="/atom.xml" title="DeepThought" type="application/atom+xml">
  <link rel="stylesheet" href="/css/style.css" media="screen" type="text/css">

  <link rel="stylesheet" href="//at.alicdn.com/t/font_1187293_8fec2ou5fyx.css">

  <!-- <link rel="stylesheet" href="//cdn.bootcss.com/highlight.js/9.6.0/styles/github.min.css"> -->
  <!-- <script src="//cdn.bootcss.com/highlight.js/9.6.0/highlight.min.js"></script> -->
  <script src="/js/highlight.min.js"></script>

  <link rel="stylesheet" href="/css/markdown.css">

  <script src="/js/av-min.3.0.4.js"></script>
  <script src="/js/Valine.min.1.3.6.js"></script>

</head></html>

<body>
  <header id="header" class="inner"><div class="alignleft">
  <h1><a href="/">DeepThought</a></h1>
  <h2><a href="/">知识需沉淀，更需分享</a></h2>
</div>
<nav id="main-nav" class="alignright">
  <ul>
    
      <li><a href="/">首页</a></li>
    
      <li><a href="/about">关于我</a></li>
    
      <li><a href="/atom.xml">订阅RSS</a></li>
    
  </ul>
  <div class="clearfix"></div>
</nav>
<div class="clearfix"></div>
        </header>
  <div id="content" class="inner">
    <div id="main-col" class="alignleft"><div id="wrapper"><article class="post">
  
  <div class="post-content">
    <header>
      
        <div class="icon"></div>
      

 
      
  
    <h1 class="title">基于 .NET CORE 3.1 提供的 worker service 来创建 windows 服务</h1>
  


      
        <time datetime="2020-07-13T04:15:43.000Z">
          create: 2020-07-13 12:15:43 | update: 2020-07-13 22:29:43
            <span style="float: right;">
    <span class="post-count" id="busuanzi_container_page_pv" style="display: inline;">
        
        本文总阅读量: <span id="busuanzi_value_page_pv"></span>&nbsp;次
        <span class="blueSeparate">&nbsp;|&nbsp;</span>
        
        <span class="post-count">文章总字数:&nbsp;1.2k&nbsp;字</span>
    <span class="blueSeparate">&nbsp;|&nbsp;</span>
    <span class="post-count">阅读约需:&nbsp;5&nbsp;分钟</span>
    <br>
</span>
</span>
        </time>
      
            
    </header>
    <div class="entry">
      
      <p>.NET CORE 3.1 提供了 worker service 这么一个模板，可以方便开发者来创建”windows 服务程序“（同样可发布于 linux）。本篇以 centos 7.6 为发布环境，简要说明如何使用 worker service 来创建服务，并部署发布到 centos 中。</p>
<p>你可以通过以下命令来查看本地安装的 .net core 环境：</p>
<p></p><p class="code-caption" data-lang="sh" data-line_number="backend" data-trim_indent="backend" data-label_position="outer" data-labels_left="Code" data-labels_right=":" data-labels_copy="Copy Code"><span class="code-caption-label"></span></p><p></p>
<pre><code class="sh">dotnet   --version  # 笔者为 3.1.301
</code></pre>
<p>你可以通过以下命令来查看是否含有 worker service 模板：</p>
<p></p><p class="code-caption" data-lang="sh" data-line_number="backend" data-trim_indent="backend" data-label_position="outer" data-labels_left="Code" data-labels_right=":" data-labels_copy="Copy Code"><span class="code-caption-label"></span></p><p></p>
<pre><code class="sh">dotnet  new  -l
</code></pre>
<p><img src="https://pic.zhuliang.ltd/20200713132132.png" alt></p>
<h1 id="安装"><a href="#安装" class="headerlink" title="安装"></a>安装</h1><h2 id="方式1：命令行形式安装"><a href="#方式1：命令行形式安装" class="headerlink" title="方式1：命令行形式安装"></a>方式1：命令行形式安装</h2><p>你可以通过如下命令在当前解决方案中安装：</p>
<a id="more"></a>
<blockquote>
<p>这里以项目：”OrderCenter.ConsumerService“ 为例</p>
</blockquote>
<p></p><p class="code-caption" data-lang="sh" data-line_number="backend" data-trim_indent="backend" data-label_position="outer" data-labels_left="Code" data-labels_right=":" data-labels_copy="Copy Code"><span class="code-caption-label"></span></p><p></p>
<pre><code class="sh">cd  解决方案路径

dotnet  new  worker  -o  OrderCenter.ConsumerService

# 之后你可以手动在 解决方案 中添加刚创建的项目，或者通过以下命令来进行引用
dotnet  sln  OrderCenter.sln  add   ./OrderCenter.ConsumerService.csproj
</code></pre>
<p>创建的项目如下：</p>
<p><img src="https://pic.zhuliang.ltd/20200713132547.png" alt></p>
<h2 id="方式2：UI界面"><a href="#方式2：UI界面" class="headerlink" title="方式2：UI界面"></a>方式2：UI界面</h2><p>如果你不习惯使用命令行来创建项目，可以直接通过 UI 界面来添加项目：<br><img src="https://pic.zhuliang.ltd/20200713133815.png" alt></p>
<ul>
<li>注：笔者的VS版本为 Visual Studio 2019 - v16.6.2</li>
</ul>
<h1 id="配置"><a href="#配置" class="headerlink" title="配置"></a>配置</h1><p>worker service 默认支持 IOC，你可以直接使用，同时你也可以直接配置日志等信息，示例如下：</p>
<p>本博文涉及的引用包及版本如下：<br><img src="https://pic.zhuliang.ltd/20200713132855.png" alt></p>
<p>你可以在 Program.cs 中进行配置，代码如下：</p>
<p></p><p class="code-caption" data-lang="csharp" data-line_number="backend" data-trim_indent="backend" data-label_position="outer" data-labels_left="Code" data-labels_right=":" data-labels_copy="Copy Code"><span class="code-caption-label"></span></p><p></p>
<pre><code class="csharp">public static IHostBuilder CreateHostBuilder(string[] args) =&gt;
   Host.CreateDefaultBuilder(args)
       .UseContentRoot(Directory.GetCurrentDirectory())
       .ConfigureAppConfiguration((hostingContext, config) =&gt;
           {
               config
                   .AddJsonFile(&quot;appsettings.json&quot;, true, true)
                   .AddJsonFile($&quot;appsettings.{Environment.GetEnvironmentVariable(&quot;DOTNET_ENVIRONMENT&quot;)}.json&quot;, true, true)
                   .AddCommandLine(args);
           })
       .ConfigureLogging(config =&gt;
       {
           config.SetMinimumLevel(LogLevel.Trace);
           if (Environment.OSVersion.Platform == PlatformID.Unix)
           {
               config.AddLog4Net(&quot;log4net.linux.config&quot;);
           }
           else
           {
               config.AddLog4Net();
           }
       })
       .ConfigureServices((hostContext, services) =&gt;
       {
           #region &gt;&gt; 服务发现
          // 你的业务代码，若有
           #endregion

           #region &gt;&gt; 初始化数据库
           // 你的业务代码，若有
           #endregion

           #region &gt;&gt; IOC
           services.AddApplicationService();
           services.AddDomainService();
           services.AddRepository();
           #endregion

           services.AddHostedService&lt;Worker&gt;();
       }).UseSystemd(); //需引用 Microsoft.Extensions.Hosting.Systemd.dll
</code></pre>
<p>你可以在 Worker.cs 中编写业务代码，示例如下：</p>
<blockquote>
<p>本文以 MQ 消费者为例：</p>
</blockquote>
<p></p><p class="code-caption" data-lang="csharp" data-line_number="backend" data-trim_indent="backend" data-label_position="outer" data-labels_left="Code" data-labels_right=":" data-labels_copy="Copy Code"><span class="code-caption-label"></span></p><p></p>
<pre><code class="csharp">public class Worker : BackgroundService
{
    private readonly IRabbitMqDomainService _mqClient;

    public Worker(IRabbitMqDomainService mqClient) //支持 IoC
    {
        _mqClient = mqClient;
        _mqClient.Initialize();
    }

    protected override async Task ExecuteAsync(CancellationToken stoppingToken)
    {
        _mqClient.SubscribeAutoAuditOrder();
        _mqClient.SubscribeGenerateDeliverSheet();
        while (!stoppingToken.IsCancellationRequested)
        {
            LogHelper&lt;Worker&gt;.LogInformation(&quot;服务还活着。&quot;, &quot;ExecuteAsync&quot;);
           //对于 定时任务，如果要求不高，可直接使用 worker service 自带的特性来进行。
           await Task.Delay(600000, stoppingToken);
        }
    }

    public override Task StopAsync(CancellationToken cancellationToken)
    {
        LogHelper&lt;Worker&gt;.LogInformation(&quot;服务停止。&quot;, &quot;StopAsync&quot;);
        return base.StopAsync(cancellationToken);
    }
}
</code></pre>
<h1 id="生成发布文件"><a href="#生成发布文件" class="headerlink" title="生成发布文件"></a>生成发布文件</h1><blockquote>
<ul>
<li>以下为 发布到 CentOS 为例，对应的 RID 为 linux-x64</li>
<li>更多 RID 你可以查询：<a href="https://docs.microsoft.com/zh-cn/dotnet/core/rid-catalog#windows-rids" target="_blank" rel="noopener">https://docs.microsoft.com/zh-cn/dotnet/core/rid-catalog#windows-rids</a></li>
</ul>
</blockquote>
<h2 id="通过命令生成"><a href="#通过命令生成" class="headerlink" title="通过命令生成"></a>通过命令生成</h2><p>通过以下命令可以生成发布文件，</p>
<p></p><p class="code-caption" data-lang="sh" data-line_number="backend" data-trim_indent="backend" data-label_position="outer" data-labels_left="Code" data-labels_right=":" data-labels_copy="Copy Code"><span class="code-caption-label"></span></p><p></p>
<pre><code class="sh">cd 发布项目路径
# 生成发布到 linux 环境的发布包
dotnet  publish  -c  release  -r  linux-x64  -f  netcoreapp3.1

# 生成发布到  windows 环境的发布包
dotnet  publish  -c  release  -r  win81-x64  -f  netcoreapp3.1
</code></pre>
<h2 id="通过-UI-生成"><a href="#通过-UI-生成" class="headerlink" title="通过 UI 生成"></a>通过 UI 生成</h2><p><img src="https://pic.zhuliang.ltd/20200713220159.png" alt></p>
<h1 id="发布"><a href="#发布" class="headerlink" title="发布"></a>发布</h1><h2 id="发布到-linux-中"><a href="#发布到-linux-中" class="headerlink" title="发布到 linux 中"></a>发布到 linux 中</h2><h3 id="将对应的发布文件上传到服务器中"><a href="#将对应的发布文件上传到服务器中" class="headerlink" title="将对应的发布文件上传到服务器中"></a>将对应的发布文件上传到服务器中</h3><p>假设上传到的目录为：</p>
<p></p><p class="code-caption" data-lang="sh" data-line_number="backend" data-trim_indent="backend" data-label_position="outer" data-labels_left="Code" data-labels_right=":" data-labels_copy="Copy Code"><span class="code-caption-label"></span></p><p></p>
<pre><code class="sh">/usr/bp/myservice/
</code></pre>
<blockquote>
<p>假设服务的运行程序为：/usr/bp/myservice/OrderCenter.ConsumerService.dll</p>
</blockquote>
<h3 id="自启动设置"><a href="#自启动设置" class="headerlink" title="自启动设置"></a>自启动设置</h3><p>这里介绍 3 种让服务开机自启动的方式，当然你也可以用 PM2 之类的进程守护程序来进行。</p>
<h4 id="1-通过-crontab-来设置开机运行"><a href="#1-通过-crontab-来设置开机运行" class="headerlink" title="1.通过 crontab 来设置开机运行"></a>1.通过 crontab 来设置开机运行</h4><p></p><p class="code-caption" data-lang="sh" data-line_number="backend" data-trim_indent="backend" data-label_position="outer" data-labels_left="Code" data-labels_right=":" data-labels_copy="Copy Code"><span class="code-caption-label"></span></p><p></p>
<pre><code class="sh">crontab  -e

#在编辑器中添加如下代码：
@reboot  /usr/bp/myservice/OrderCenter.ConsumerService.dll
</code></pre>
<h4 id="2-通过在-rc-local-文件夹设置开机运行"><a href="#2-通过在-rc-local-文件夹设置开机运行" class="headerlink" title="2.通过在 rc.local 文件夹设置开机运行"></a>2.通过在 rc.local 文件夹设置开机运行</h4><p></p><p class="code-caption" data-lang="sh" data-line_number="backend" data-trim_indent="backend" data-label_position="outer" data-labels_left="Code" data-labels_right=":" data-labels_copy="Copy Code"><span class="code-caption-label"></span></p><p></p>
<pre><code class="sh">vi   /etc/rc.d/rc.local

# 在该文件中添加如下命令即可
/usr/bp/myservice/OrderCenter.ConsumerService.dll
</code></pre>
<h4 id="3-通过-systemd-进行开机启动"><a href="#3-通过-systemd-进行开机启动" class="headerlink" title="3.通过 systemd 进行开机启动"></a>3.通过 systemd 进行开机启动</h4><p>创建 service 文件</p>
<p></p><p class="code-caption" data-lang="sh" data-line_number="backend" data-trim_indent="backend" data-label_position="outer" data-labels_left="Code" data-labels_right=":" data-labels_copy="Copy Code"><span class="code-caption-label"></span></p><p></p>
<pre><code class="sh">cd  /etc/systemd/systerm/
vim  myservice.service

# 创建的文件内容如下---请自行根据项修改对应的值
[Unit]
Description=work service demo

[Service]
# Case sensitive.  目录
WorkingDirectory=/usr/bp/myservice
# 具体文件
ExecStart=/bin/dotnet /usr/bp/myservice/OrderCenter.ConsumerService.dll
Restart=always
# Restart service after 10 seconds if the dotnet service crashes:
RestartSec=10
KillSignal=SIGINT
SyslogIdentifier=your-service-name
User=root
Environment=ASPNETCORE_ENVIRONMENT=Development
Environment=DOTNET_PRINT_TELEMETRY_MESSAGE=false

[Install]
WantedBy=multi-user.target
</code></pre>
<p>设置自启动</p>
<p></p><p class="code-caption" data-lang="sh" data-line_number="backend" data-trim_indent="backend" data-label_position="outer" data-labels_left="Code" data-labels_right=":" data-labels_copy="Copy Code"><span class="code-caption-label"></span></p><p></p>
<pre><code class="sh">systemctl  enable  myservice
</code></pre>
<p>启动服务</p>
<p></p><p class="code-caption" data-lang="sh" data-line_number="backend" data-trim_indent="backend" data-label_position="outer" data-labels_left="Code" data-labels_right=":" data-labels_copy="Copy Code"><span class="code-caption-label"></span></p><p></p>
<pre><code class="sh">systemctl  start  myservice
</code></pre>
<h2 id="发布到-windows-环境中"><a href="#发布到-windows-环境中" class="headerlink" title="发布到 windows 环境中"></a>发布到 windows 环境中</h2><p>如果要发布到 windows 服务种，则需要安装 Microsoft.Extensions.Hosting.WindowsServices.dll （替换上面的 Microsoft.Extensions.Hosting.Systemd）</p>
<p>同时修改 Program.cs 代码</p>
<p></p><p class="code-caption" data-lang="csharp" data-line_number="backend" data-trim_indent="backend" data-label_position="outer" data-labels_left="Code" data-labels_right=":" data-labels_copy="Copy Code"><span class="code-caption-label"></span></p><p></p>
<pre><code class="csharp">public static IHostBuilder CreateHostBuilder(string[] args) =&gt;
   Host.CreateDefaultBuilder(args)
       .UseContentRoot(Directory.GetCurrentDirectory())
       .ConfigureAppConfiguration((hostingContext, config) =&gt;
           {
               config
                   .AddJsonFile(&quot;appsettings.json&quot;, true, true)
                   .AddJsonFile($&quot;appsettings.{Environment.GetEnvironmentVariable(&quot;DOTNET_ENVIRONMENT&quot;)}.json&quot;, true, true)
                   .AddCommandLine(args);
           })
       .ConfigureLogging(config =&gt;
       {
           //other codes                    
           services.AddHostedService&lt;Worker&gt;();
       }).UseWindowsService(); //替换原 UseSystemd()
</code></pre>
<p>通过 sc.exe 命令行工具来创建服务，命令如下：</p>
<p></p><p class="code-caption" data-lang="sh" data-line_number="backend" data-trim_indent="backend" data-label_position="outer" data-labels_left="Code" data-labels_right=":" data-labels_copy="Copy Code"><span class="code-caption-label"></span></p><p></p>
<pre><code class="sh"># 创建服务
# 注意：binPath后面的 &quot;=&quot;号后面有一个空格
sc.exe create YOURSERVICENAME binPath= X:\OrderCenter.ConsumerService.exe

# 启动服务
sc.exe  start  YOURSERVICENAME

# 查询服务
sc.exe  query  YOURSERVICENAME

# 停止服务
sc.exe stop YOURSERVICENAME 

# 删除服务
sc.exe delete YOURSERVICENAME
</code></pre>
<p>参考：</p>
<blockquote>
<ul>
<li><a href="https://docs.microsoft.com/zh-cn/dotnet/framework/windows-services/walkthrough-creating-a-windows-service-application-in-the-component-designer" target="_blank" rel="noopener">Tutorial: Create a Windows service app</a></li>
<li><a href="https://docs.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken.iscancellationrequested?view=netcore-3.1" target="_blank" rel="noopener">canceltoken 说明</a></li>
</ul>
</blockquote>

      

      <div>
        
        <div style="background-color: rgb(255, 23, 0);user-select: auto;height: 3px;width:100%;margin-top: 40px;margin-bottom:15px;"></div>

<!-- <p>常言道：学然后知不足，教然后知困。</p>
<p>我知道你的焦虑，一起共进加油：P</p>
<p>关不关注都无所谓，会根据生活节奏紧凑度定期分享些开发经验、搬砖生涯、痛点、感悟。</p>
<p>
        <img src="https://pic.zhuliang.ltd/20191213133908.gif" alt="欢迎关注我的订阅号：P" />
</p> -->
<ul class="post-copyright" style="margin-left:0px;">
    <li class="post-copyright-author">
        <strong>本文作者：</strong>积慕
    </li>
    <li class="post-copyright-link">
        <strong>本文链接：</strong>
        <a href="/2020/07/backend/worker-service.html" title="基于 .NET CORE 3.1 提供的 worker service 来创建 windows 服务">https://blog.zhuliang.ltd/2020/07/backend/worker-service.html</a>
    </li>
    <li class="post-copyright-license">
        <strong>版权： </strong>
        本站文章均采用 <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/cn/" rel="external nofollow"
            target="_blank">CC BY-NC-SA 3.0 CN</a> 许可协议，请勿用于商业，转载注明出处！
    </li>
</ul>
        
      </div>
    </div>

    <footer>
      
      
  
  <div class="categories">
    <a href="/categories/backend/">backend</a>
  </div>

      
  
  <div class="tags">
    <a href="/tags/net-core/">.net core</a>, <a href="/tags/linux/">linux</a>, <a href="/tags/centos/">centos</a>
  </div>

      <!-- 
  <div class="addthis addthis_toolbox addthis_default_style">
    
    
      <a class="addthis_button_tweet"></a>
    
    
      <a class="addthis_button_google_plusone" g:plusone:size="medium"></a>
    
    
      <a class="addthis_button_pinterest_pinit" pi:pinit:layout="horizontal"></a>
    
    <a class="addthis_counter addthis_pill_style"></a>
  </div>
  <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js"></script>
 -->
      
      <div class="clearfix"></div>
    </footer>
  </div>
</article>

<!-- 
<section id="comment">
  <h1 class="title">留言</h1>

  <div id="vcomments" style="background-color: #fff"></div>
  <script>
    new Valine({
      el: '#vcomments',
      appId: 'aTPKmG6tjDo3CbIXzAPzrj4X-gzGzoHsz',
      appKey: 'hNgWFneNpEcMnBJclPQnDgsd',
      notify: true,
      verify: true, //验证码
      avatar: 'monsterid', //https://valine.js.org/avatar.html
      placeholder: '请输入你的评论'
    })
  </script>
</section>
 --> <!--启用/关闭 LeanCloud 评论--></div></div>
    <aside id="sidebar" class="alignright">
  
<div class="widget tag">
  <h3 class="title"><i class="iconfont icon-category"></i>&nbsp;&nbsp;分类</h3>
  <ul class="entry">
  
    <li><a href="/categories/Obsidian/">Obsidian</a><small>1</small></li>
  
    <li><a href="/categories/PowerUser/">PowerUser</a><small>4</small></li>
  
    <li><a href="/categories/backend/">backend</a><small>57</small></li>
  
    <li><a href="/categories/frontend/">frontend</a><small>9</small></li>
  
    <li><a href="/categories/operations/">operations</a><small>5</small></li>
  
    <li><a href="/categories/提前退休/">提前退休</a><small>2</small></li>
  
  </ul>
</div>


  
<div class="widget tag">
  <h3 class="title"><i class="iconfont icon-new3"></i>&nbsp;&nbsp;最新文章</h3>
  <ul class="entry">
    
      <li>
        <a href="/2024/11/PowerUser/install-docker-in-pve-lxc.html">1. 通过 PVE LXC 搭建 docker 环境</a>
      </li>
    
      <li>
        <a href="/2024/11/Obsidian/obsidian-render-pie-chart.html">2. 2 套用于 obsidian 的生成时间占用饼图脚本示例，基于 templater， charts，echarts+dataview</a>
      </li>
    
      <li>
        <a href="/2024/10/PowerUser/fix-ios18-samba-readonly-issue.html">3. 解决 ios 18（包括ipadOS 18） 下通过文件(files app)连接 samba 服务器，目录变成只读权限的问题</a>
      </li>
    
      <li>
        <a href="/2023/07/operations/how-to-use-pm2.html">4. PM2 的安装、配置和使用</a>
      </li>
    
      <li>
        <a href="/2023/07/backend/expose-intranet-netcoreapi-to-internet.html">5. 通过 DDNS+显性URL 把内网部署的.NET CORE WEBAPI 项目暴露到公网中</a>
      </li>
    
  </ul>
</div>


  
<div class="widget tag">
  <h3 class="title"><i class="iconfont icon-tag"></i>&nbsp;&nbsp;标签</h3>
  <ul class="entry">
  
    <li><a href="/tags/net-core/">.net core</a><small>12</small></li>
  
    <li><a href="/tags/Debian/">Debian</a><small>2</small></li>
  
    <li><a href="/tags/Docker/">Docker</a><small>1</small></li>
  
    <li><a href="/tags/Elasticsearch/">Elasticsearch</a><small>35</small></li>
  
    <li><a href="/tags/Elasticsearch-Nest系列/">Elasticsearch.Nest系列</a><small>35</small></li>
  
    <li><a href="/tags/Obsidian/">Obsidian</a><small>1</small></li>
  
    <li><a href="/tags/PVE/">PVE</a><small>2</small></li>
  
    <li><a href="/tags/StackExchange-Redis系列/">StackExchange.Redis系列</a><small>12</small></li>
  
    <li><a href="/tags/centos/">centos</a><small>3</small></li>
  
    <li><a href="/tags/flex/">flex</a><small>1</small></li>
  
    <li><a href="/tags/ios/">ios</a><small>1</small></li>
  
    <li><a href="/tags/javascript/">javascript</a><small>1</small></li>
  
    <li><a href="/tags/linux/">linux</a><small>4</small></li>
  
    <li><a href="/tags/nginx/">nginx</a><small>2</small></li>
  
    <li><a href="/tags/nuget/">nuget</a><small>2</small></li>
  
    <li><a href="/tags/react/">react</a><small>6</small></li>
  
    <li><a href="/tags/styled-components/">styled-components</a><small>1</small></li>
  
    <li><a href="/tags/内网穿透/">内网穿透</a><small>4</small></li>
  
    <li><a href="/tags/培训讲义/">培训讲义</a><small>2</small></li>
  
    <li><a href="/tags/基础知识/">基础知识</a><small>2</small></li>
  
    <li><a href="/tags/性能优化/">性能优化</a><small>2</small></li>
  
    <li><a href="/tags/教程/">教程</a><small>64</small></li>
  
    <li><a href="/tags/理财/">理财</a><small>2</small></li>
  
    <li><a href="/tags/生命周期/">生命周期</a><small>1</small></li>
  
    <li><a href="/tags/经验/">经验</a><small>4</small></li>
  
  </ul>
</div>


  
  <script type="text/javascript" charset="utf-8" src="/js/tagcloud.js"></script>
  <script type="text/javascript" charset="utf-8" src="/js/tagcanvas.js"></script>
  <div class="widget tag">
    <h3 class="title"><i class="iconfont icon-cloud1"></i>&nbsp;&nbsp;标签云</h3>
    <div id="myCanvasContainer" class="widget tagcloud">
      <canvas width="250" height="250" id="resCanvas" style="width:100%">
        <a href="/tags/net-core/" style="font-size: 17.14px;">.net core</a> <a href="/tags/Debian/" style="font-size: 11.43px;">Debian</a> <a href="/tags/Docker/" style="font-size: 10px;">Docker</a> <a href="/tags/Elasticsearch/" style="font-size: 18.57px;">Elasticsearch</a> <a href="/tags/Elasticsearch-Nest系列/" style="font-size: 18.57px;">Elasticsearch.Nest系列</a> <a href="/tags/Obsidian/" style="font-size: 10px;">Obsidian</a> <a href="/tags/PVE/" style="font-size: 11.43px;">PVE</a> <a href="/tags/StackExchange-Redis系列/" style="font-size: 17.14px;">StackExchange.Redis系列</a> <a href="/tags/centos/" style="font-size: 12.86px;">centos</a> <a href="/tags/flex/" style="font-size: 10px;">flex</a> <a href="/tags/ios/" style="font-size: 10px;">ios</a> <a href="/tags/javascript/" style="font-size: 10px;">javascript</a> <a href="/tags/linux/" style="font-size: 14.29px;">linux</a> <a href="/tags/nginx/" style="font-size: 11.43px;">nginx</a> <a href="/tags/nuget/" style="font-size: 11.43px;">nuget</a> <a href="/tags/react/" style="font-size: 15.71px;">react</a> <a href="/tags/styled-components/" style="font-size: 10px;">styled-components</a> <a href="/tags/内网穿透/" style="font-size: 14.29px;">内网穿透</a> <a href="/tags/培训讲义/" style="font-size: 11.43px;">培训讲义</a> <a href="/tags/基础知识/" style="font-size: 11.43px;">基础知识</a> <a href="/tags/性能优化/" style="font-size: 11.43px;">性能优化</a> <a href="/tags/教程/" style="font-size: 20px;">教程</a> <a href="/tags/理财/" style="font-size: 11.43px;">理财</a> <a href="/tags/生命周期/" style="font-size: 10px;">生命周期</a> <a href="/tags/经验/" style="font-size: 14.29px;">经验</a>
      </canvas>
    </div>
  </div>




</aside>
    <div class="clearfix"></div>
  </div>
  <footer id="footer" class="inner"><div class="alignleft">

  
  &copy; 2018 - 2024 &nbsp;<a href='/about'>积慕</a>
  
  &nbsp;&nbsp;<a href='https://www.cnblogs.com/deepthought/'>我的博客园地址</a>
  &nbsp;&nbsp;finalclassic#outlook.com
</div>

<div class="clearfix"></div>
<div>
  本站主题基于：<a href='https://github.com/hexojs/hexo-theme-light' rel="external nofollow">hexo-theme-light</a>
</div>
<div id="busuanzi_container_site_pv">
  本站总访问量&nbsp;<span id="busuanzi_value_site_pv"></span>&nbsp;次
</div>
<div style="width:300px;margin:0 auto; padding:20px 0;">
  <a target="_blank" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=31011702004805" style="display:inline-block;text-decoration:none;height:20px;line-height:20px;">
    <img src="https://pic.zhuliang.ltd/20200102164648.png" style="float:left;"><p style="float:left;height:20px;line-height:20px;margin: 0px 0px 0px 5px; color:#939393;">沪公网安备 31011702004805号</p></a>
</div></footer>
  <script src="/js/jquery-2.0.3.min.js"></script>
<script src="/js/jquery.imagesloaded.min.js"></script>
<script src="/js/gallery.js"></script>




<link rel="stylesheet" href="/fancybox/jquery.fancybox.css" media="screen" type="text/css">
<script src="/fancybox/jquery.fancybox.pack.js"></script>
<script type="text/javascript">
(function($){
  $('.fancybox').fancybox();
})(jQuery);
</script>


<script type="text/javascript">
hljs.initHighlightingOnLoad();
</script>

<!-- <script src="/js/busuanzi.pure.mini.js"></script> -->
<script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
<script>
    var _hmt = _hmt || [];
    (function () {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?ea793b9c8d6b31df666a6bc15038e246";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
    })();
</script>
<script>
    (function () {
        var bp = document.createElement('script');
        var curProtocol = window.location.protocol.split(':')[0];
        if (curProtocol === 'https') {
            bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
        }
        else {
            bp.src = 'http://push.zhanzhang.baidu.com/push.js';
        }
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(bp, s);
    })();
</script>
</body>
</html>
